package com.zyy.other.locator;

/**
 * @Description: 类描述
 * @Author: zyy
 * @Date: 2023/08/12 10:47
 */
public class Client {
    public static void main(String[] args) {
        ServiceLocator serviceLocator = new ServiceLocator();
        Service service = serviceLocator.getService("service-1");
        service.execute();

        service = serviceLocator.getService("service-2");
        service.execute();

        service = serviceLocator.getService("service-1");
        service.execute();

        service = serviceLocator.getService("service-2");
        service.execute();
    }
}
